home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / Xt / XtPopup.z / XtPopup
Encoding:
Text File  |  1998-10-30  |  8.8 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      XXXXttttPPPPooooppppuuuupppp((((3333XXXXtttt))))       XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))        XXXXttttPPPPooooppppuuuupppp((((3333XXXXtttt))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XtPopup, XtPopupSpringLoaded, XtCallbackNone,
  10.           XtCallbackNonexclusive, XtCallbackExclusive - map a pop-up
  11.  
  12.      SSSSYYYYNNNNTTTTAAAAXXXX
  13.           void XtPopup(_p_o_p_u_p__s_h_e_l_l, _g_r_a_b__k_i_n_d)
  14.                 Widget _p_o_p_u_p__s_h_e_l_l;
  15.                 XtGrabKind _g_r_a_b__k_i_n_d;
  16.  
  17.           void XtPopupSpringLoaded(_p_o_p_u_p__s_h_e_l_l)
  18.                 Widget _p_o_p_u_p__s_h_e_l_l;
  19.  
  20.           void XtCallbackNone(_w, _c_l_i_e_n_t__d_a_t_a, _c_a_l_l__d_a_t_a)
  21.                 Widget _w;
  22.                 XtPointer _c_l_i_e_n_t__d_a_t_a;
  23.                 XtPointer _c_a_l_l__d_a_t_a;
  24.  
  25.           void XtCallbackNonexclusive(_w, _c_l_i_e_n_t__d_a_t_a, _c_a_l_l__d_a_t_a)
  26.                 Widget _w;
  27.                 XtPointer _c_l_i_e_n_t__d_a_t_a;
  28.                 XtPointer _c_a_l_l__d_a_t_a;
  29.  
  30.           void XtCallbackExclusive(_w, _c_l_i_e_n_t__d_a_t_a, _c_a_l_l__d_a_t_a)
  31.                 Widget _w;
  32.                 XtPointer _c_l_i_e_n_t__d_a_t_a;
  33.                 XtPointer _c_a_l_l__d_a_t_a;
  34.  
  35.           void MenuPopup(_s_h_e_l_l__n_a_m_e)
  36.                 String _s_h_e_l_l__n_a_m_e;
  37.  
  38.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  39.           _c_a_l_l__d_a_t_a Specifies the callback data, which is not used by
  40.                     this procedure.
  41.  
  42.           _c_l_i_e_n_t__d_a_t_a
  43.                     Specifies the pop-up shell.
  44.  
  45.           _g_r_a_b__k_i_n_d Specifies the way in which user events should be
  46.                     constrained.
  47.  
  48.           _p_o_p_u_p__s_h_e_l_l
  49.                     Specifies the widget shell.
  50.  
  51.           _w         Specifies the widget.
  52.  
  53.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  54.           The _X_t_P_o_p_u_p function performs the following:
  55.  
  56.           +o    Calls _X_t_C_h_e_c_k_S_u_b_c_l_a_s_s to ensure popup_shell is a
  57.                subclass of _S_h_e_l_l.
  58.  
  59.           +o    Generates an error if the shell's popped_up field is
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 4/30/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXttttPPPPooooppppuuuupppp((((3333XXXXtttt))))       XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))        XXXXttttPPPPooooppppuuuupppp((((3333XXXXtttt))))
  71.  
  72.  
  73.  
  74.                already
  75.  
  76.                _T_r_u_e.
  77.  
  78.           +o    Calls the callback procedures on the shell's
  79.                popup_callback list.
  80.  
  81.           +o    Sets the shell popped_up field to _T_r_u_e, the shell
  82.                spring_loaded field to _F_a_l_s_e, and the shell grab_kind
  83.                field from grab_kind.
  84.  
  85.           +o    If the shell's create_popup_child field is non-NULL,
  86.                _X_t_P_o_p_u_p calls it with popup_shell as the parameter.
  87.  
  88.           +o    If grab_kind is either _X_t_G_r_a_b_N_o_n_e_x_c_l_u_s_i_v_e or
  89.                _X_t_G_r_a_b_E_x_c_l_u_s_i_v_e, it calls:
  90.  
  91.           XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), False)
  92.  
  93.           +o    Calls _X_t_R_e_a_l_i_z_e_W_i_d_g_e_t with popup_shell specified.
  94.  
  95.           +o    Calls _X_M_a_p_W_i_n_d_o_w with popup_shell specified.
  96.  
  97.           The _X_t_P_o_p_u_p_S_p_r_i_n_g_L_o_a_d_e_d function performs exactly as _X_t_P_o_p_u_p
  98.           except that it sets the shell _s_p_r_i_n_g__l_o_a_d_e_d field to _T_r_u_e
  99.           and always calls _X_t_A_d_d_G_r_a_b with _e_x_c_l_u_s_i_v_e _T_r_u_e and
  100.           _s_p_r_i_n_g__l_o_a_d_e_d _T_r_u_e.
  101.  
  102.           The _X_t_C_a_l_l_b_a_c_k_N_o_n_e, _X_t_C_a_l_l_b_a_c_k_N_o_n_e_x_c_l_u_s_i_v_e, and
  103.           _X_t_C_a_l_l_b_a_c_k_E_x_c_l_u_s_i_v_e functions call _X_t_P_o_p_u_p with the shell
  104.           specified by the client data argument and grab_kind set as
  105.           the name specifies.  _X_t_C_a_l_l_b_a_c_k_N_o_n_e, _X_t_C_a_l_l_b_a_c_k_N_o_n_e_x_c_l_u_s_i_v_e,
  106.           and _X_t_C_a_l_l_b_a_c_k_E_x_c_l_u_s_i_v_e specify _X_t_G_r_a_b_N_o_n_e,
  107.           _X_t_G_r_a_b_N_o_n_e_x_c_l_u_s_i_v_e, and _X_t_G_r_a_b_E_x_c_l_u_s_i_v_e, respectively.  Each
  108.           function then sets the widget that executed the callback
  109.           list to be insensitive by using _X_t_S_e_t_S_e_n_s_i_t_i_v_e.  Using these
  110.           functions in callbacks is not required.  In particular, an
  111.           application must provide customized code for callbacks that
  112.           create pop-up shells dynamically or that must do more than
  113.           desensitizing the button.
  114.  
  115.           _M_e_n_u_P_o_p_u_p is known to the translation manager, which must
  116.           perform special actions for spring-loaded pop-ups.  Calls to
  117.           _M_e_n_u_P_o_p_u_p in a translation specification are mapped into
  118.           calls to a nonexported action procedure, and the translation
  119.           manager fills in parameters based on the event specified on
  120.           the left-hand side of a translation.
  121.  
  122.           If _M_e_n_u_P_o_p_u_p is invoked on _B_u_t_t_o_n_P_r_e_s_s (possibly with
  123.           modifiers), the translation manager pops up the shell with
  124.           grab_kind set to _X_t_G_r_a_b_E_x_c_l_u_s_i_v_e and spring_loaded set to
  125.           _T_r_u_e.  If _M_e_n_u_P_o_p_u_p is invoked on _E_n_t_e_r_W_i_n_d_o_w (possibly with
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 4/30/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXttttPPPPooooppppuuuupppp((((3333XXXXtttt))))       XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))        XXXXttttPPPPooooppppuuuupppp((((3333XXXXtttt))))
  137.  
  138.  
  139.  
  140.           modifiers), the translation manager pops up the shell with
  141.           grab_kind set to _X_t_G_r_a_b_N_o_n_e_x_c_l_u_s_i_v_e and spring_loaded set to
  142.           _F_a_l_s_e.  Otherwise, the translation manager generates an
  143.           error.  When the widget is popped up, the following actions
  144.           occur:
  145.  
  146.           +o    Calls _X_t_C_h_e_c_k_S_u_b_c_l_a_s_s to ensure popup_shell is a
  147.                subclass of _S_h_e_l_l.
  148.  
  149.           +o    Generates an error if the shell's popped_up field is
  150.                already _T_r_u_e.
  151.  
  152.           +o    Calls the callback procedures on the shell's
  153.                popup_callback list.
  154.  
  155.           +o    Sets the shell popped_up field to _T_r_u_e and the shell
  156.                grab_kind and spring_loaded fields appropriately.
  157.  
  158.           +o    If the shell's create_popup_child field is non-NULL, it
  159.                is called with popup_shell as the parameter.
  160.  
  161.           +o    Calls:
  162.  
  163.           XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), spring_loaded)
  164.  
  165.           +o    Calls _X_t_R_e_a_l_i_z_e_W_i_d_g_e_t with popup_shell specified.
  166.  
  167.           +o    Calls _X_M_a_p_W_i_n_d_o_w with popup_shell specified.
  168.  
  169.           (Note that these actions are the same as those for _X_t_P_o_p_u_p.)
  170.           _M_e_n_u_P_o_p_u_p tries to find the shell by searching the widget
  171.           tree starting at the parent of the widget in which it is
  172.           invoked.  If it finds a shell with the specified name in the
  173.           pop-up children of that parent, it pops up the shell with
  174.           the appropriate parameters.  Otherwise, it moves up the
  175.           parent chain as needed.  If _M_e_n_u_P_o_p_u_p gets to the
  176.           application widget and cannot find a matching shell, it
  177.           generates an error.
  178.  
  179.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  180.           XtCreatePopupShell(3Xt), XtPopdown(3Xt)
  181.           _X _T_o_o_l_k_i_t _I_n_t_r_i_n_s_i_c_s - _C _L_a_n_g_u_a_g_e _I_n_t_e_r_f_a_c_e
  182.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 4/30/98)
  196.  
  197.  
  198.  
  199.